{% extends "jwc/jwc_header.html" %}
{% block context %}
    <div class="page_header">
        <h3 align="center">学生图书归还</h3>
    </div>
    <div class="container">
        <table class="table table-hover">
            <tr>
                <th scope="col">编号</th>
                <th scope="col">开始</th>
                <th scope="col">结束</th>
                <th scope="col">状态</th>
            </tr>
            </thead>
            <tbody>
            {% for order in orders %}
                <tr>
                    <td>{{ order.book_id }}</td>
                    <td>{{ order.startdate }}</td>
                    <td>{{ order.supposedate }}</td>
                    <td><button class="btn btn-primary" onclick="window.location.href='/stu_book_return?book_id={{ order.book_id }}'">归还</button></td>
                </tr>
            {% empty %}
                <div class="alert alert-info" role="alert">
                    <strong>抱歉</strong>
                    暂时没有需要归还的图书
                </div>
            {% endfor %}
            </tbody>
        </table>
    </div>
{% endblock context %}
